home *** CD-ROM | disk | FTP | other *** search
- #pragma once
-
- typedef struct OffscreenStruct OffscreenType, *OffscreenPtr, **OffscreenHandle;
- typedef void (*OffscreenDrawType)(OffscreenHandle offscreen, void *data);
-
- struct OffscreenStruct {
- GrafPtr port; /* port to draw into */
- Rect bounds; /* portion of port to map */
- BitMap srcbits; /* offscreen bitmap */
- BitMap dstbits; /* on-screen bitmap */
- Handle base; /* base address for offscreen bitmap */
- Boolean drawing; /* true if drawing to offscreen bitmap */
- Boolean changed; /* true if offscreen bitmap needs reimaging */
- RgnHandle mask; /* mask for CopyBits */
- RgnHandle clip; /* saved clip region */
- RgnHandle vis; /* saved visible region */
- void *data; /* data for draw procedure */
- OffscreenDrawType draw; /* application supplied draw procedure */
- };
-
- /* validation */
- Boolean OffscreenValid(OffscreenHandle offscreen);
-
- /* allocation */
- OffscreenHandle OffscreenBegin(GrafPtr port, OffscreenDrawType draw, void *data);
- void OffscreenEnd(OffscreenHandle offscreen);
-
- /* attributes, properties */
- void OffscreenBounds(OffscreenHandle offscreen, Rect *bounds);
- void OffscreenBoundsSet(OffscreenHandle offscreen, const Rect *bounds);
- void OffscreenChange(OffscreenHandle offscreen);
- void OffscreenPurge(OffscreenHandle offscreen);
- Boolean OffscreenPurged(OffscreenHandle offscreen);
- Boolean OffscreenDrawing(OffscreenHandle offscreen);
- GrafPtr OffscreenPort(OffscreenHandle offscreen);
-
- /* drawing */
- void OffscreenDrawProcedure(OffscreenHandle offscreen);
- void OffscreenDrawBitMap(OffscreenHandle offscreen);
- void OffscreenDraw(OffscreenHandle offscreen);
- void OffscreenBeginDrawing(OffscreenHandle offscreen);
- void OffscreenEndDrawing(OffscreenHandle offscreen);
-
-